
package com.jf.cloud.multishop.controller.admin;

import com.jf.cloud.common.database.dto.PageDTO;
import com.jf.cloud.common.database.vo.PageVO;
import com.jf.cloud.common.response.ServerResponseEntity;
import com.jf.cloud.common.security.AuthUserContext;
import com.jf.cloud.multishop.bo.mongo.MongoShopWalletLogBO;
import com.jf.cloud.multishop.service.ShopWalletLogService;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 商家提现申请信息
 *
 * @author zz
 * @Date 2022/6/30 17:23
 */
@RestController("adminShopRechargeController")
@RequestMapping("/mp/shop_recharge")
@Tag(name = "admin-商家充值记录信息")
public class ShopRechargeController {

    @Autowired
    private ShopWalletLogService shopWalletLogService;

    @GetMapping("/page")
    @Operation(summary = "分页获取商家充值记录信息" , description = "分页获取商家充值记录信息")
    public ServerResponseEntity<PageVO<MongoShopWalletLogBO>> page(PageDTO pageDTO) {
        Long shopId = AuthUserContext.get().getTenantId();

        PageVO<MongoShopWalletLogBO> pageVO = shopWalletLogService.getRechargePageByShopId(pageDTO, shopId);
        return ServerResponseEntity.success(pageVO);
    }



}
